#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File    :   config.py
@Time    :   2020/09/25 16:50:15
@Author  :   fengzhilaoling 
@Version :   1.0
@Contact :   fengzhilaoling@163.com
'''

class Config(object):
    DEBUG = False
    TESTING = False
    DATABASE_URL = 'sqlite://:memory'


# 生产环境
class ProductionConfig(Config):
    DATABASE_URI = 'mysql://user@localhost/foo'


# 开发环境
class DevelopmentConfig(Config):
    DEBUG = True
    SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://fengling:123456@39.96.7.141:3306/ceshi1'
    #设置这一项是每次请求结束后都会自动提交数据库中的变动
    SQLALCHEMY_COMMIT_ON_TEARDOWN=True
    SQLALCHEMY_TRACK_MODIFICATIONS= True


# 测试环境
class TestingConfig(Config):
    TESTING = True